package scala.caseClass

object MainOB {
   def main(args: Array[String]): Unit = {
      val aClass = new AClass("Foo", 18)
      println(aClass)

      //pattern matching
      val c = new Student("test Scala")
      val d = 5
      val t = 4.5
      val list = List(c, d, t)
      for (l <- list) {
         l match {
            case p: Student    => println("A persion")
            case x: Int        => println("An integer")
            case somethingElse => println("Another Type")
            //or
            // case _ => println("sdfsdf")
         }
      }
   }

   case class Student(name: String)
}